package com.hex.ds.hdtp.core.app.script.analyze.dto.request;

import cn.hutool.core.collection.CollUtil;
import com.hex.ds.hdtp.core.app.script.analyze.dto.ScriptAnalyzeTaskDto;
import lombok.Data;
import lombok.experimental.Accessors;

import java.util.List;

/**
 * @Package com.hex.ds.hdtp.core.app.script.analyze.dto.request
 * @ClassName ScriptAnalyzeTaskRequestDto
 * @Description 脚本分析任务-request对象
 * @Author gj.xu
 * @Date 2023/12/7 14:42
 * @Version v2.0
 **/
@Data
@Accessors(chain = true)
public class ScriptAnalyzeTaskRequestDto extends ScriptAnalyzeTaskDto {

    private List<String> fileList;

    private List<String> transferTaskList;

    public Integer getTotal() {
        if (CollUtil.isNotEmpty(fileList)) {
            return fileList.size();
        } else {
            return total;
        }
    }
}
